package com.qijian.maindata.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qijian.maindata.domain.EquipmentLedger;
import com.qijian.maindata.domain.dto.LedgerStatisticsDTO;
import com.qijian.maindata.domain.query.EquipmentLedgerQuery;
import com.qijian.maindata.domain.vo.EquipmentLedgerVo;
import com.qijian.maindata.domain.vo.ProcessOrderUsersVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 设备台账Mapper接口
 *
 * @author qijian
 * @date 2024-01-19
 */
public interface EquipmentLedgerMapper extends BaseMapper<EquipmentLedger> {

    @Select("select count(0) from main_equipment_ledger WHERE create_time >= CURRENT_DATE ")
    int countCurrentDateWithDel();

    List<EquipmentLedgerVo> pageVo( @Param(Constants.WRAPPER) QueryWrapper<EquipmentLedgerQuery> queryWrapper);

    EquipmentLedgerVo getVo(@Param(value = "id") Long id);

    List<LedgerStatisticsDTO> getStatisticsDetail(@Param(value = "deptId")String deptId);

    List<LedgerStatisticsDTO> getStatistics();


    List<EquipmentLedger> listForExcel( @Param(Constants.WRAPPER) QueryWrapper<EquipmentLedgerQuery> queryWrapper);
}
